//
//  ServerInterface.h
//  Contacts
//
//  Created by 李 雷川 on 14-7-19.
//  Copyright (c) 2014年 李 雷川. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFHTTPSessionManager.h"

@interface ServerInterface : AFHTTPSessionManager
+(ServerInterface *) sharedServerInterface;

//检查客户端更新状态
+(NSURLSessionDataTask *)checkNewClient:(NSDictionary *)paramDic   WithBlock:(void (^)(NSDictionary *posts, NSError *error))block;

//获取所有联系人
+(NSURLSessionDataTask *)getContactsWithContactDis:(NSDictionary *)paramDic   WithBlock:(void (^)(NSDictionary *posts, NSError *error))block;


//登录
+(NSURLSessionDataTask *)loginWithInfoDic:(NSDictionary*)paramDic  withBlock:(void (^)(NSDictionary *userInfoDic, NSError *error))block;

//上传头像
+(NSURLSessionDataTask *)uploadHeadWithDic:(NSDictionary*)paramDic withFileName:(NSString *)fileName withBlock:(void (^)(NSDictionary *userInfoDic, NSError *error))block;

//下载图片
+(NSURL *)downloadImageWithUrlPath:(NSString*)urlPath withBlock:(void (^)(UIImage *image, NSError *error))block;

//更新用户信息
+(NSURLSessionDataTask *)updateUserInfoWithInfoDic:(NSDictionary*)paramDic  withBlock:(void (^)(NSDictionary *userInfoDic, NSError *error))block;

//重置密码
+(NSURLSessionDataTask *)resetPasswordWithInfoDic:(NSDictionary*)paramDic  withBlock:(void (^)(NSDictionary *userInfoDic, NSError *error))block;

//首页新闻列表
+(NSURLSessionDataTask *)getFirstIndexNewsWithDic:(NSDictionary*)paramDic  withBlock:(void (^)(NSDictionary *newDic, NSError *error))block;

//类别
+(NSURLSessionDataTask *)getCategoryWithDic:(NSDictionary*)paramDic  withBlock:(void (^)(NSDictionary *categoryDic, NSError *error))block;

//类别下对应的所有消息
+(NSURLSessionDataTask *)getCategoryNoticesWithDic:(NSDictionary*)paramDic  withBlock:(void (^)(NSDictionary *categoryDic, NSError *error))block;

//获取消息或者活动详情
+(NSURLSessionDataTask *)getNoticeDetailWithDic:(NSDictionary*)paramDic  withBlock:(void (^)(NSDictionary *noticeDetailDic, NSError *error))block;

//反馈
+(NSURLSessionDataTask *)feedbackWithDic:(NSDictionary*)paramDic  withBlock:(void (^)(NSDictionary *noticeDetailDic, NSError *error))block;
@end
